<template>
<div>
	<div class="mask" v-show="visible"></div>
	<div class="modal " v-show="visible" >
    <div >
      <div class="title">{{title}}</div>
      <div v-on:click="handleActions('cancel')" class="close">X</div>
    </div>
    <div class="message">
      <div  v-html="message"></div>
    </div>

		<button v-on:click="handleActions('confirm')" class="btn primary">{{btn}}</button>

	</div>
</div>


</template>
<script>
	export default{
		name:'Model',
		data(){
			return{
				btn:"确定",
				message:"",
				callback:null,
				visible:true,
				title:"title"
			}
		},
		methods:{
			handleActions(action){
				this.visible=false;
				var callback = this.callback
				callback(action)
			}
		}
	}
</script>
